package com.ssy.lingxi.search.api.hystrix;

import com.ssy.lingxi.common.exception.BusinessException;
import com.ssy.lingxi.common.response.ResponseCode;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.search.api.feign.ISearchFeign;
import com.ssy.lingxi.search.api.model.request.CommoditySkuRequest;
import com.ssy.lingxi.search.api.model.response.CommoditySkuResponse;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import javax.validation.Valid;
import java.util.List;

/**
 * 内部接口-熔断服务实现类
 * @author jw.chen
 * @version 2.0.0
 * @date 2022/1/26
 */
@Component
@Qualifier("searchHystrix")
public class SearchHystrix implements ISearchFeign {

    @Override
    public Wrapper<List<CommoditySkuResponse>> getCommoditySkuList(@Valid CommoditySkuRequest commoditySkuRequest) {
        throw new BusinessException(ResponseCode.SERVICE_SEARCH_ERROR);
    }
}
